<?php
namespace Mazentop\GoogleAnalytics\Block;
use Magento\Framework\View\Element\Template;

class Ga extends \Magento\GoogleAnalytics\Block\Ga{


    public function getPageTrackingCode($accountId)
    {
        $pageName = trim($this->getPageName());
        $optPageURL = '';
        if ($pageName && substr($pageName, 0, 1) == '/' && strlen($pageName) > 1) {
            $optPageURL = ", '{$this->escapeJsQuote($pageName)}'";
        }

        return "\nga('create', '{$this->escapeJsQuote(
            $accountId
        )}', 'auto');\nga('require', 'GTM-TL4FZK4');\nga('send', 'pageview'{$optPageURL});\n";
    }
}

